package com.wangan.wanganpush.dao;

import com.wangan.wanganpush.model.Trajectory;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface TrajectoryDao extends JpaRepository<Trajectory,Integer>{

    //根据flag字段查询出未发送的数据
    @Query(value = "SELECT * from wangan_trajectory a where a.flag = ?1 limit 0,1000;", nativeQuery = true)
    List<Trajectory> findAllByFlag(int flag);
}
